<template>
  <div id="notice-detail">
    <div class="page-card">
      <div class="page-header">
        <div class="page-title">公告详情</div>
      </div>
      <div class="page-content">
        <div class="notice-title">{{noticeDetail.title}}</div>
        <div class="notice-content">{{noticeDetail.content}}</div>
      </div>
    </div>
  </div>
</template>

<script>
  import {
    apiNoticeDetail
  } from '../../request/api.js'
  import { mapGetters } from 'vuex';
  export default {
    data(){
      return {
        noticeDetail: {},
         userToken: window.localStorage.getItem('token')
      }
    },
    created() {
      apiNoticeDetail({
        noticeId: this.$route.query.id,
        token: this.userToken
      }).then(res =>{
         if (res.code == 1){
          this.noticeDetail = res.msg
         } else {
           this.$message.error(res.msg);
         }
      }).catch(res => {
          this.$message.error(res.msg)
      })
    },
    methods:{

    }
  }
</script>

<style lang="less">
  #notice-detail{
    .page-card {
      background: #FFFFFF;
      margin-bottom: 16px;
      box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.1);
      padding-bottom: 16px;
      border-radius: 5px;
      .page-header {
        background: #ecf5ff;
        padding: 10px;
        display: flex;
        align-items: center;
        margin-bottom: 16px;
        .page-title {
          line-height: 20px;
          border-left: 3px solid #666666;
          padding-left: 10px;
          font-size: 16px;
          font-weight: 700;
          color: #333333;
          width: 150px;
        }
      }
      .page-content {
        padding: 10px 20px ;
        .notice-title {
          text-align: center;
          font-size: 30px;
          margin-bottom: 16px;
        }
        .notice-content {
          font-size: 16px;
          color: #666666;
        }
      }
    }
  }
</style>
